package com.cskaoyan.module.regionvo;

import com.cskaoyan.module.pojo.MarketRegion;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@NoArgsConstructor
@Data
@AllArgsConstructor
public class RegionListVo {

    @JsonProperty("total")
    private Integer total;
    @JsonProperty("pages")
    private Integer pages;
    @JsonProperty("limit")
    private Integer limit;
    @JsonProperty("page")
    private Integer page;
    @JsonProperty("list")
    private List<MarketRegion> list;

    @NoArgsConstructor
    @Data
    public static class ListDTO {
        @JsonProperty("id")
        private Integer id;
        @JsonProperty("name")
        private String name;
        @JsonProperty("type")
        private Integer type;
        @JsonProperty("code")
        private Integer code;
        @JsonProperty("children")
        private List<ChildrenDTO> children;

        @NoArgsConstructor
        @Data
        public static class ChildrenDTO {
            @JsonProperty("id")
            private Integer id;
            @JsonProperty("name")
            private String name;
            @JsonProperty("type")
            private Integer type;
            @JsonProperty("code")
            private Integer code;
            @JsonProperty("children")
            private List<ChildrenDTO> children;

        }
    }
}
